home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
COMAL
/
U-User Group
/
(k)u9.d64
/
disk'get'improv
< prev
next >
Wrap
Text File
|
2007-02-28
|
1KB
|
42 lines
9900 //
9901 // DISK'GET ROUTINES FOLLOW
9902 //
9903 PROC DISK'GET(FILE'NUM,COUNT,REF FILE'END) CLOSED
9904 POKE 2025,FILE'NUM
9905 POKE 2039,(COUNT MOD 256)
9906 SYS 2024
9907 FILE'END:=PEEK(144)
9908 ENDPROC DISK'GET
9909 //
9910 PROC DISK'GET'SKIP(COUNT,FILE'NUM,REF FILE'END) CLOSED
9911 DISK'GET(FILE'NUM,COUNT,FILE'END)
9912 ENDPROC DISK'GET'SKIP
9913 //
9914 PROC DISK'GET'STRING(REF ITEM$,COUNT,FILE'NUM,REF FILE'END) CLOSED
9915 ITEM$:=""
9916 DISK'GET(FILE'NUM,COUNT,FILE'END)
9917 FOR X#:=1 TO COUNT DO ITEM$(X#):=CHR$(PEEK(1023+X#))
9918 ENDPROC DISK'GET'STRING
9919 //
9920 PROC DISK'GET'INIT CLOSED
9921 FOR LOC#:=2024 TO 2045 DO
9922 READ V
9923 POKE LOC#,V
9924 ENDFOR LOC#
9925 DATA 162,0,32,198,255,162,0
9926 DATA 32,207,255,157,0,4,232
9927 DATA 224,0,208,245,32,204,255,96
9928 //
9929 // 2024 LDX #0 ;FILE NO.
9930 // 2026 JSR FFC6 ;OPEN CHAN IN X
9931 // 2029 LDX #0 ;INDEX
9932 // 2031 JSR FFCF ;INP CHAR
9933 // 2034 STA 0400,X ;STOR TO SCREEN
9934 // 2037 INX ;NEXT BYTE
9935 // 2038 CPX #0
9936 // 2040 BNE 2031 ;MORE?
9937 // 2042 JSR FFCC ;RESTIO
9938 // 2045 RTS ;DONE
9939 ENDPROC DISK'GET'INIT
9940 //